<template>
	<view>
		<view v-if="active==0">
			<pos-report></pos-report>
		</view>
		<view v-if="active==1">
			<pos-order></pos-order>
		</view>
		<view v-if="active==2">
			<pos-manage></pos-manage>
		</view>
		<view v-if="active==3">
			<pos-my></pos-my>
		</view>
		
		<custom-tab-bar v-on:setActive="getActive"></custom-tab-bar>
	</view>
</template>

<script>
	import Config from '@/util/index.js'
	import customTabBar from '../../components/custom-tab-bar/index.vue'
	import posOrder from './order/index.vue'
	import posReport from './report/index.vue'
	import posManage from './manage/index.vue'
	import posMy from './my/index.vue'
	export default{
		components: {
			customTabBar,
			posOrder,
			posReport,
			posManage,
			posMy
		},
		data(){
			return{
				imgpath:"",
				active:0,
				storeInfo:{},
				pagetitle:["首页","订单","商户管理","我的"]
			}
		},
		onShow(){
			//this.getStoreInfo()
		},
		onLoad(){
			this.imgpath = Config.get('apiUrl')
		},
		methods:{
			getActive(act){
				this.active = act
			   uni.setNavigationBarTitle({
					title:this.pagetitle[act]
				});
			}
		},
	}
</script>

<style>
</style>
